﻿/*
 * LdRequest
 * 
 * initial implementation : 26.6.2013
 *
 * Copyright (c) Adam Sida, asida@centrum.cz.
 * All rights reserved.
 * 
 * for license see cz.uhul.DSMLv2.txt
 */
using System;
using System.Collections.Generic;
using System.Xml;
using System.Xml.Serialization;

namespace cz.uhul.DSMLv2
{



  /// <Summary>
  /// The LdDnRequest class is the base
  /// class for request related classes, like the SearchRequest
  /// and LdAddRequest classes, where request contains DN
  /// </Summary>
  public abstract class LdDnRequest : LdRequest
  {





    public LdDnRequest()
      :base()
    { }





    //[XmlAttribute(AttributeName = "dn", DataType="string", Type=typeof(LdDistinguishedName))]
    /// <summary>
    /// get/set distinguished name used for operation
    /// </summary>
    [XmlIgnore]
    public LdDistinguishedName DistinguishedName { get; set; }


    /// <summary>
    /// this is just XmlSerializer property, same meaning as DistinguishedName propery
    /// </summary>
    [XmlAttribute("dn")]
    [System.ComponentModel.Browsable(false), System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
    public string DnString
    {
      get { return (DistinguishedName == null) ? null : DistinguishedName; }
      set { DistinguishedName = (value == null) ? null : LdDistinguishedName.Parse(value); }
    }


  }

}